//---------------------------- //Utility defines (define "PlayableSite" (difference (sites Occupied by:Mover))) (define "IsPlayableSiteType" (is In (to) ("PlayableSite"))) (define "AlongLine" (sites Distance (step #1 (to if:True)) from:(from) (min 1))) (define "FurtherAlongLine" (sites Distance (step #1 (to if:True)) from:(to) (min 1))) (define "MoveTowardFriendInSameLine" (< 0 (count Pieces Mover in:("FurtherAlongLine" #1)))) (define "FirstFriend" (sites To (move Hop #1 (between (min 0) if:(or { (= (from) (between)) (is Next (who at:(between))) (is Empty (between)) }) ) (to if:(is Mover (who at:(to)))) ) ) ) (define "DestinationGroupSize" (count Sites in:(sites Distance Orthogonal (step (to if:(and (!= (var "From") (to)) (is Mover (who at:(to)))))) from:(to) (min 0) ) ) ) //-------------------------------------------------------- // Variants (define "AdvancedSquishSlide" (do (set Var "OriginGroupSize" (size Group at:(from)) (then (set Var "From" (from))) ) next:(move (from (from)) (to ("AlongLine" #1) if:(and { (all Sites (sites Between from:(from) to:(to)) if:(is Empty (site))) ("IsPlayableSiteType") ("MoveTowardFriendInSameLine" #1) (or (is Next (who at:(to))) (<= (var "OriginGroupSize") ("DestinationGroupSize") ) ) }) (apply (remove (to)) ) ) ) ) ) (define "MoveByDirection" (forEach Piece (or { ( NNE) ( E) ( SSE) ( SSW) ( W) ( NNW) }) ) ) //----------------------------------------------- // Main routine (game "Don't Mosey and The Last Scavenger" (players 2) (equipment { (board (hex Hexagon ) use:Cell) (piece "Disc" Each) }) (rules (start { }) (play ) (end ) ) ) //-------------------------------------- // End conditions (define "AMSEnd" (if (no Moves Next) (result Mover Loss))) (define "Last2MoveEnd" ("BlockWin")) //------------------------------------------------- // Options (option "Game" args:{